
<include file="./Tpl/Default/Common/m_header.html" />


<include file="./Tpl/Default/Common/m_menu.html" />




<!-- /. NAV SIDE  -->
<div id="page-wrapper" >
        <div id="page-inner">
                <div class="row">
                        <div class="col-md-12">
                                <h1 class="page-header">
                                        Tables Page <small>Responsive tables</small>
                                </h1>
                        </div>
                </div> 
                <!-- /. ROW  -->

                <div class="row">
                        <div class="col-md-12">
                                <!-- Advanced Tables -->
                                <div class="panel panel-default">
                                        <div class="panel-heading">
                                                Advanced Tables
                                        </div>
                                        <div class="panel-body">
                                                <div class="table-responsive">
                                                        <table class="table table-striped table-bordered table-hover" id="dataTables-example">
                                                                <thead>
                                                                        <tr>
                                                                                <th>ID</th>

                                                                                <th>昵称</th>

                                                                                <th>级别</th>



                                                                                <th>邮箱</th>

                                                                                <th>电话</th>


                                                                                <th>注册时间</th>

                                                                                <th>操作</th>
                                                                        </tr>
                                                                </thead>
                                                                <tbody>



                                                                <volist name="list" id="list">


                                                                        <tr class="odd gradeX">
                                                                                <td>{$list.member_id}</td>


                                                                                <td>{$list.member_nickname}</td>


                                                                                <td>

                                                                                        <input name="member_type"  size="1"      old="{$list.member_type}" value="{$list.member_type}" uid="{$list.member_id}" type="text">      
                                                                                </td>   




                                                                                <td>{$list.member_email}</td>



                                                                                <td>{$list.member_tel}</td>





                                                                                <td>{$list.member_regtime}</td>



                                                                                <td>

                                                                                        [<a class="link-update" href="__APP__/Article/show/id/{$list.article_id}">查看详情</a>]
                                                                                        [<a class="link-update" href="__APP__/Member/editArticle/id/{$list.article_id}">编辑文章</a>]
                                                                                        [<a class="link-del" href="#" tId="{$info.sharp_id}">删除</a>]


                                                                                </td>
                                                                        </tr>

                                                                </volist>


                                                                </tbody>
                                                        </table>
                                                </div>

                                        </div>
                                </div>
                                <!--End Advanced Tables -->
                        </div>
                </div>

        </div>

        <script>


                //用户级别修改
                $("input[name='member_type']").blur(function() {

                        var type = $(this).val();







                        var uid = $(this).attr("uid");



                        var old = $(this).attr("old");
                        if (!isNaN(type) && type >= 0) {



                                $.post("__APP__/Member/ajaxUpdateMembertype/",
                                        {type: type, uid: uid},
                                function(data) {


                                        if (data.status == true) {
                                                alert('修改成功！');
                                        } else if (data.status == -1) {
                                                alert('非法操作');
                                        } else if (data.status == false) {

                                                alert('操作失败');

                                        } else {

                                                reload();
                                        }


                                }, 'json');
                        } else {
                                alert('请填写正确的数值');
                                $(this).val(old);
                        }
                });





        </script>   



        <include file="./Tpl/Default/Common/m_footer.html" />